﻿namespace Huayou.Common.Database
{
    using System;
    using System.Data;

    public abstract class DBOperate : IDisposable
    {
        public abstract void BeginTran();
        public abstract void Close();
        public abstract void CommitTran();
        public abstract void Dispose();
        public abstract IDataReader ExecPreQueryForDataReader(string strSql, IDataParameter[] parameters);
        public abstract DataSet ExecPreQueryForDataSet(string strSql, IDataParameter[] parameters, string strTableName);
        public abstract DataTable ExecPreQueryForDataTable(string strSql, IDataParameter[] parameters);
        public abstract int ExecPreUpdateSql(string strSql, IDataParameter[] parameters);
        public abstract IDataReader ExecProcForDataReader(string strSql, IDataParameter[] parameters);
        public abstract DataSet ExecProcForDataSet(string strSql, IDataParameter[] parameters, string strTableName);
        public abstract DataTable ExecProcForDataTable(string strSql, IDataParameter[] parameters);
        public abstract IDataReader ExecQueryForDataReader(string strSql);
        public abstract DataSet ExecQueryForDataSet(string strSql, string strTableName);
        public abstract DataTable ExecQueryForDataTable(string strSql);
        public abstract object ExecScalar(string strSql);
        public abstract object ExecScalar(string strSql, IDataParameter[] parameters);
        public abstract int ExecUpdateProc(string strSql, IDataParameter[] parameters);
        public abstract int ExecUpdateSql(string strSql);
        public abstract void Open();
        public abstract void RollBackTran();

        public abstract IDbConnection baseConnection { get; set; }

        public abstract IDbTransaction baseTransaction { get; set; }
    }
}

